原创内容,转载请注明出处:https://www.myzhenai.com.cn/post/1992.html https://www.myzhenai.com/thread-17408-1-1.html
关键词:Linux Centos Apache php Mysql phpmysqladmin pure-ftpd 安装配置教程 LAMP安装配置教程
Linux下安装Apache php Mysql就是俗称的“LAMP”,网上有很多一键安装包,但其实我们可以自行安装,安装方法也很简单.
yum update -y yum install gcc gcc-c++ make libxml2-devel libtool mysql mysql-libs mysql-server mysql-devel httpd php php-devel libevent libevent-devel php-mysql mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-pecl-memcache mysql-connector-odbc libdbi-dbd-mysql php-eaccelerator php-imap php-odbc -y mysqladmin -u root password "you mysql root password" service httpd restart service mysqld restart php -v wget https://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.12/phpMyAdmin-4.1.12-all-languages.zip #wget https://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.3.10/phpMyAdmin-4.3.10-all-languages.zip #4.3.10版需要php5.5以上,所以你要根据你的php版本来确认 chkconfig httpd on chkconfig --add mysqld chkconfig mysqld on
OR
#安装之前请先安装Epel源,https://www.myzhenai.com/thread-15362-1-1.html yum remove httpd* -y yum remove mysql* -y yum remove php* -y yum check-update yum install httpd* ntp make wget openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel perl-libwww-perl libjpeg -y yum install mysql mysql-server mysql-libs mysql-devel mod_ssl mod_ruid2 mod_rpaf mod_fastcgi mod_fcgid mod_fpm -y service mysqld start chkconfig mysqld on chkconfig httpd on mysqladmin -u root password "you mysql root password" yum install php php-cli php-mysql php-mysqlnd php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel php-pecl-memcache php-pecl-memcache-debuginfo php-opcache -y yum install fail2ban clamav rkhunter #yum install php-intl php-tidy php-soap php-gd php-mcrypt php-cli php-enchant php-ldap php-process php-imap php-bcmath php-common php-recode php-fpm php-pspell php-xml php-litespeed php-pdo php-mysql php-xmlrpc php-snmp php-mbstring php-xml php-gd php-mbstring php-mcrypt php-ldap php-imap php-pecl-xdebug php-pdo php php-fpm php-devel php-pecl-geoip-debuginfo php-pecl-memcache kloxomr-thirdparty-phpmyadmin php-cli php-pear php-pgsql php-gmp php-pecl-lzf php-pecl-memcache-debuginfo php-pecl-lzf-debuginfo php-common php-process php-mysqlnd php-bcmath php-pecl-geoip php-opcache php-pecl-xdebug-debuginfo php-xmlrpc service php-fpm start chkconfig php-fpm on
Pure-ftpd安装教程:https://www.myzhenai.com.cn/post/1812.html
vi /etc/httpd/conf/httpd.conf KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 Listen 80 ServerName ServerIP:80 DocumentRoot "/you Catalog" # # This should be changed to whatever you set DocumentRoot to. ## for more information. # Options -Indexes # Options FileInfo AuthConfig Limit # AllowOverride All ServerAdmin webmaster@myDomain.com DocumentRoot /var/www/myDomain ServerName myDomain.com ErrorLog /var/log/myDomain.com-error_log CustomLog /var/log/myDomain.com-access_log common ServerAdmin webmaster@myDomain1.com DocumentRoot /var/www/myDomain1 ServerName myDomain1 ErrorLog /var/log/myDomain1-error_log CustomLog /var/log/myDomain1-access_log common #*替换成你的域名或子域名,有多个子域名的话可以增加VirtualHost配置文件.下面的参数也要相应的修改为你子域名对应的目录和日志文件. TraceEnable off
①.在apache配置文件httpd.conf中找到:LoadModule rewrite_module modules/mod_rewrite.so这句,去掉前边的注释符号“#”,如果没有则添加这句。 ②.在代码: Options FollowSymLinks AllowOverride None 下面添加伪静态代码(以Wordpress伪静态为例): RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] ③.重启apache:
phpmysqladmin配置方法:
tar -xzvf phpMyAdmin-4.1.12-all-languages.zip OR tar -xzvf phpMyAdmin-4.3.10-all-languages.zip mv phpMyAdmin-4.1.12-all-languages /var/www/phpmysqladmin #/var/www/是你网站所在目录,并且打开/var/phpmysqladmin/libraries/config.default.php 编辑mysql连接参数保存后即可.
sicnature ---------------------------------------------------------------------
I P 地 址: 3.135.184.186
区 域 位 置: 美国
系 统 信 息:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普 | 海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://myzhenai.com.cn/post/1992.html
没有评论