vim /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq #保存退出 shutdown -r now #重启系统
[epel] name=Extra Packages for Enterprise Linux 6 - $basearch baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 [epel-debuginfo] name=Extra Packages for Enterprise Linux 6 - $basearch - Debug baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 6 - $basearch - Source baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1
ius | 2.3 kB 00:00 ius/primary_db | 183 kB 00:00 repo id repo name status base CentOS-6 - Base 5,062 epel Extra Packages for Enterprise Linux 6 - i386 9,992 extras CentOS-6 - Extras 39 ius IUS Community Packages for Enterprise Linux 6 - i386 329 updates CentOS-6 - Updates 382 repolist: 15,804
[root@localhost ~]# yum list nginx mysql php Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * ius: hkg.mirror.rackspace.com * updates: mirrors.163.com Available Packages mysql.i686 5.1.73-7.el6 base nginx.i686 1.10.1-1.el6 epel php.i686 5.3.3-48.el6_8 updates
软件名字 软件版本 #软件所在仓库 php56u.i686 5.6.26-1.ius.centos6 ius mysql55.i686 5.5.52-1.ius.centos6 ius 安装nginx yum remove httpd* php* #删除系统自带的软件包 yum install nginx #安装nginx 根据提示输入y进行安装 chkconfig nginx on #设置nginx开机启动 service nginx start #启动nginx 安装MySQL yum remove mysql* #删除系统已经安装的mysql yum list mysql* #列出mysql所有版本,找到要安装的版本的名字 yum install mysql57u* #我安装的是mysql5.7.15。输入Y即可自动安装,直到安装完成 service mysqld start #启动MySQL chkconfig mysqld on #设为开机启动
yum install php56u-fpm php56u-mbstring php56u-bcmath php56u-mcrypt php56u-xmlrpc php56u-pdo php56u-xml php56u-xmlrpc php56u-mysqlnd php56u-gd php56u-opcache #安装php5.6及扩展 chkconfig php-fpm on #设置php-fpm开机启动 service php-fpm start #启动php-fpm
#
# The default server
#
server {
listen 80;
server_name n.com;
root /usr/share/nginx/html;
index index.php index.html;
# Load configuration files for the default server block.
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .*.(php)?$ {
expires -1s;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
cd /usr/share/nginx/html #进入html目录 vim index.php #新建index.php,加上phpinfo();
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有