• 欢迎访问VPS岛网站,国外VPS,国内VPS,国外服务器,国内服务器,服务器主机,测评及优惠码,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群

php mysql nginx

mysql技术 mb5cf4c374f30dc 151次浏览 已收录 0个评论
                                                nginx配置

一、cd /usr/local/nginx/conf
编辑版本改IP
www.nautilus.org
ssb.nautilus.org
ssa.nautilus.org
二、./nginx -t查看有无报错
ps aux | grep nginx
./nginx bbs.nautilus.org重启
cd html
curl bbs.bautilus.org
ifconfig查看ip然后去浏览器登陆

                                                 mysql配置

一、在cenos上下载mysql。5.6.33版本
#解压
tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
#复制解压后的mysql目录
cp -r mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/mysql
二、#添加用户组
groupadd mysql
#添加用户mysql 到用户组mysql
useradd -g mysql mysql
三、cd /usr/local/mysql/<br>mkdir ./data/mysql
chown -R mysql:mysql ./
./scripts/mysql_install_db –user=mysql –datadir=/usr/local/mysql/data/mysql
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
cp support-files/my-default.cnf /etc/my.cnf

#修改启动脚本
vi /etc/init.d/mysqld

#修改项:
basedir=/usr/local/mysql/
datadir=/usr/local/mysql/data/mysql

#启动服务
service mysqld start

#测试连接
./mysql/bin/mysql -uroot

#加入环境变量,编辑 /etc/profile,这样可以在任何地方用mysql命令了
export PATH=$PATH:/usr/local/mysql//bin

#启动mysql
service mysqld start
#关闭mysql
service mysqld stop
#查看运行状态
service mysqld status

                                                  php配置

一、先下载源码包
wget http://cn2.php.net/distributions/php-5.6.0.tar.xz
然后 解压
1# xz -d php-5.6.0.tar.xz
1# tar xf php-5.6.0.tar -C /usr/local/src/
然后yam编译安装
yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel
yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel bz2-devel

yum -y install libmcrypt-devel mhash mcrypt
(yum install epel-release.noarch )
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
二、创建www用户
groupadd www
useradd -g www -s /sbin/nologin -M www
编译安装
cd /usr/local/src/php-5.6.0/

三、# ./configure \
–prefix=/usr/local/php56 \
–with-config-file-path=/usr/local/php56/etc \
–enable-inline-optimization \
–disable-debug \
–disable-rpath \
–enable-shared \
–enable-opcache \
–enable-fpm \
–with-fpm-user=www \
–with-fpm-group=www \
–with-mysql=mysqlnd \
–with-mysqli=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-gettext \
–enable-mbstring \
–with-iconv \
–with-mcrypt \
–with-mhash \
–with-openssl \
–enable-bcmath \
–enable-soap \
–with-libxml-dir \
–enable-pcntl \
–enable-shmop \
–enable-sysvmsg \
–enable-sysvsem \
–enable-sysvshm \
–enable-sockets \
–with-curl \
–with-zlib \
–enable-zip \
–with-bz2 \
–with-readline\
–with-gd
配置redis php
wget https://github.com/phpredis/phpredis/archive/develop.zip –no-check-certificate
unzip develop.zip
cd phpredis-develop/
phpize
./configure –with-php-config=/usr/local/php56/bin/php-config
make && make install
vim /usr/local/php56/etc/php.ini
[redis]extension=redis.so
配置 memcache
./configure –with-php-config=/usr/local/php56/bin/php-config
[memcache]
extension=memcache.so
四、编译完成的界面是
imong.png
编译完成之后,执行安装命令:
make && make install


VPS岛 的文章和资源来自互联网,仅作为参考资料,如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。丨 转载请注明php mysql nginx
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址