Posts Tagged ‘配置’

Linux下利用yum安装Apache,php,Mysql,phpmysqladmin,pure-ftpd教程

星期日, 三月 1st, 2015

原创内容,转载请注明出处:http://www.myzhenai.com.cn/post/1992.html http://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 http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.12/phpMyAdmin-4.1.12-all-languages.zip
#wget http://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源,http://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安装教程:http://www.myzhenai.com.cn/post/1812.html

vi /etc/httpd/conf/httpd.conf
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<ifmodule itk.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</ifmodule>
<ifmodule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</ifmodule>
Listen 80
ServerName ServerIP:80
DocumentRoot "/you Catalog"
#
# This should be changed to whatever you set DocumentRoot to.
#
<directory "/you Catalog">
# for more information.
#
    Options -Indexes
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All
<virtualhost *:80>
    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
</virtualhost>
<virtualhost *:80>
    ServerAdmin webmaster@myDomain1.com
    DocumentRoot /var/www/myDomain1
    ServerName myDomain1
    ErrorLog /var/log/myDomain1-error_log
    CustomLog /var/log/myDomain1-access_log common
</virtualhost>
#*替换成你的域名或子域名,有多个子域名的话可以增加VirtualHost配置文件.下面的参数也要相应的修改为你子域名对应的目录和日志文件.
TraceEnable off
</directory>
①.在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连接参数保存后即可.

Centos6下pure-ftpd1.0.36编译安装和配置

星期三, 四月 23rd, 2014

原创内容,转载请注明出处:http://www.myzhenai.com.cn/post/1812.html http://www.myzhenai.com/thread-16208-1-1.html
http://download.pureftpd.org/pub/pure-ftpd/ http://download.pureftpd.org/pub/pure-ftpd/releases/

# yum -y install pam-devel
# groupadd pure-ftpd
# useradd -g pure-ftpd -d /var/empty -s /etc pure-ftpd
# wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.gz
# tar -xzvf pure-ftpd-1.0.36.tar.gz
# cd pure-ftpd-1.0.36
# ./configure --prefix=/usr/local/pure-ftpd/ --with-mysql --with-language=simplified-chinese --with-everything
# make && make check && make install
# mkdir -p /usr/local/pure-ftpd/etc
# cp pureftpd-mysql.conf /etc/
# cp configuration-file/pure-config.pl /usr/local/pure-ftpd/bin/
# chmod u+x /usr/local/pure-ftpd/bin/pure-config.pl
# cp configuration-file/pure-ftpd.conf /usr/local/pure-ftpd/etc/
# cp configuration-file/pure-config.pl /usr/local/sbin/
# chmod 755 /usr/local/sbin/pure-config.pl
# cp configuration-file/pure-ftpd.conf /etc/
# cp contrib/redhat.init /etc/rc.d/init.d/pureftpd
# chmod u+x /etc/rc.d/init.d/pureftpd
# chkconfig --add pureftpd
# chkconfig --level 2345 pureftpd on
# ln -s /usr/local/pure-ftpd/sbin/pure-ftpd /usr/sbin/
# /usr/local/pure-ftpd/bin/pure-config.pl /usr/local/pure-ftpd/etc/pure-ftpd.conf
# /usr/local/pure-ftpd/bin/pure-pw useradd ftpusername -u pure-ftpd -d /var/www/
# /usr/local/pure-ftpd/sbin/pure-ftpd -j -lpuredb:/etc/pureftpd.pdb &
# /usr/local/pure-ftpd/bin/pure-pw mkdb
# vi /usr/local/pure-ftpd/etc/pure-ftpd.conf
# cp /usr/local/pure-ftpd/etc/pure-ftpd.conf /etc/
/usr/local/pure-ftpd/sbin/pure-ftpd &
# service pureftpd restart

kloxo-mr下php-fpm的配置文件路径

星期四, 三月 6th, 2014

在kloxo-mr下的php-fpm的配置文件是在 /etc/php-fpm.d/ 下的,这里有两个文件,分别是admin.conf default.conf 修改先请先备份这两个文件.

#cp /etc/php-fpm.d/admin.conf /etc/php-fpm.d/admin.conf.back
#cp /etc/php-fpm.d/default.conf /etc/php-fpm.d/default.conf.back
#vi /etc/php-fpm.d/admin.conf
#vi /etc/php-fpm.d/default.conf
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 20
request_terminate_timeout = 300s
request_slowlog_timeout = 300s

WordPress插件XML Sitemap配置方法

星期三, 一月 13th, 2010

XML Sitemap是WordPress中一个用于网络内容提交的程序,目的是实时的将博客中所发表的内容提交给各大搜索引擎,注意,这里没有百度的什么事.
要配置XML Sitemap之前,请先登录FTP服务器,在WordPress根目录下创建一个空白的sitemap.xml文件,权限设置为777.再创建一个sitemap.xml.gz文件,权限设置为777.然后在WordPress后台控制板的XML Sitemap中进行设置即可.
There was a problem while notifying Ask.com. View result 出现这样一行红色警示的问题我也不得而知,我搜索了WordPress官方论坛上也有很多人出现这个问题.可能不会影响使用,因为我看了这个问题返回的内容,它好像是提交Sitemap给Ask.com的过程中出现了什么问题,点击View result链接后会出现一个错误页面,在这个页面中手动点击顶部那个链接却可以正常提交Sitemap给Ask.com.