Linux lamp一鍵安裝問題

2021-08-07 01:22:28 字數 3341 閱讀 4159

1.mysql php 安裝依賴庫出錯

解決:

yum clean all

rpm --rebuilddb

2.status_module on提示73行報錯

解決:lamp安裝包/ src/ 安裝包名稱:

覆蓋3.nginx啟動缺少 pid

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

cd /usr/local/nginx

cd logs ls

access.log error.log nginx.pid

4.linux 禁ping和開啟ping操作

# echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

如果要恢復,只要:

# echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

即可,挺方便,不要去專門使用ipchains或者iptables了。

或者用以下方法也可以,異曲同工

以root進入linux系統,然後編輯檔案icmp_echo_ignore_all

vi /proc/sys/net/ipv4/icmp_echo_ignore_all

將其值改為1後為禁止ping

將其值改為0後為解除禁止ping

5.ssh安裝

[root@localhost ~]# yum install openssh-server

這樣就可以安裝好ssh-server了。

檢驗ssh是否安裝好了,可以用下面的命令:

[linuxidc@localhost ~]$ ssh -version

openssh_5.3p1, openssl 1.0.0-fips 29 mar 2010

bad escape character 'rsion'.

如果顯示上面的資訊,說明安裝好了ssh。

6.服務端設定

先 vi /etc/ssh/sshd_config ,開啟這兩個配置:

rsaauthentication yes

pubkeyauthentication yes

如果想禁止密碼登陸,設定:

passwordauthentication no

將客戶端發來的公鑰追加到~/.ssh/authorized_keys下面(公鑰生成見下文):

cat key.pub >> ~/.ssh/authorized_keys

echo >> ~/.ssh/authorized_keys #輸入乙個回車,以便下次追加從新的一行開始

然後重啟sshd服務:

#systemctl restart sshd.service

service sshd restart

解決辦法是需要安裝openssl以及ncurses元件

yum install -y openssl*

yum -y install ncurses-devel

[client]

#password = your_password

port = 3306

socket = /mnt/tmp/mysql.sock

[mysqld]

port = 3306

socket = /mnt/tmp/mysql.sock

datadir = /usr/local/mysql/var

#datadir = /mnt/mysql

tmpdir = /mnt/tmp

skip-external-locking

key_buffer_size = 1280m

max_allowed_packet = 100m

table_open_cache = 512

sort_buffer_size = 200m

net_buffer_length = 8k

read_buffer_size = 2m

read_rnd_buffer_size = 512k

myisam_sort_buffer_size = 32m

thread_cache_size = 64

query_cache_size = 64m

tmp_table_size = 64m

table_open_cache = 512

#skip-networking

max_connections = 500000

max_connect_errors = 100

open_files_limit = 65535

#log-bin=mysql-bin

#binlog_format=mixed

server-id = 1

expire_logs_days = 10

default_storage_engine = innodb

innodb_data_home_dir = /usr/local/mysql/var

innodb_data_file_path = ibdata1:10m:autoextend

innodb_log_group_home_dir = /usr/local/mysql/var

innodb_buffer_pool_size = 512m

innodb_additional_mem_pool_size = 2m

innodb_log_file_size = 128m

innodb_log_buffer_size = 8m

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

[mysqldump]

quick

max_allowed_packet = 16m

[mysql]

no-auto-rehash

[myisamchk]

key_buffer_size = 128m

sort_buffer_size = 2m

read_buffer = 2m

write_buffer = 2m

[mysqlhotcopy]

interactive-timeout

一鍵安裝 Apache Mysql Php

適用環境 系統支援 centos 5 32bit 64bit centos 6 32bit 64bit 記憶體要求 256m 安裝了什麼 1 apache 2.2.22或apache 2.4.2 2 mysql 5.5.24 3 php 5.2.17或php 5.3.13 4 phpmyadmin ...

LAMP一鍵安裝

lamp一鍵安裝包常用於搭建動態網頁。lamp一鍵安裝包在使用時經常配合linux apache mysql mariadb perl php python等程式一起使用,這此軟體之間有著很好相容性,能夠幫助使用者快速搭建 快速建立web伺服器。適用環境 首先安裝 wget screen unzip...

LNMP一鍵安裝

安裝步驟 1 使用putty或類似的ssh工具登陸vps或伺服器 登陸後執行 screen s lnmp 如果提示screen command not found 命令不存在可以執行 yum install screen 或 apt get install screen安裝,詳細內容參考screen...