Install Nginx 1.10 MySQL 5.7.17 PHP7.1.3 on Oracle Linux 7.3

Install Nginx, MySQL, PHP On Oracle Linux 7.3

Install Nginx

Add Nginx Repo to Repo filesphp

touch /etc/yum.repos.d/nginx.repo
[nginx]
	name=nginx repo
	baseurl=http://nginx.org/packages/rhel/7/$basearch/
	gpgcheck=0
	enabled=1

更新 Repomysql

yum update

Install Nginxnginx

yum install nginx

设定开机启动:web

sudo systemctl enable nginx

Install MySQL Server 5.7

MySQL must be installed from the community repository.redis

Download and add the repository, then update.sql

wget https://repo.mysql.com/mysql57-community-release-el7-9.noarch.rpm
    sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm
    yum update

Install MySQL as usual and start the service. During installation, you will be asked if you want to accept the results from the .rpm file’s GPG verification. If no error or mismatch occurs, enter y.php7

sudo yum install mysql-server

设定开机启动:tcp

sudo systemctl start mysqld

安装完找到临时密码:测试

sudo grep 'temporary password' /var/log/mysqld.log

设定新密码: (PS. 新版本修改密码也是用这个了, update mysql.user set password=xxx 已不起做用)url

set password=password('Your@Pwd123')

打开 Firewall 3306 Port

iptables -A INPUT -i eth1 -p tcp -m tcp --dport 3306 -j ACCEPT

让其它机器能够连 MySQL

update mysql.user set host = '%' where user='root';
   flush privilieges;

Install Redis

yum install -y redis
    systemctl start redis

测试是否安装成功

redis-cli

若是出现如下提示表示成功:

127.0.0.1:6379>

加到开机启动

systemctl enable redis

Install PHP 7.1.3

yum install epel-release
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    yum update
yum install php71w-common php71w-pear php71w-pecl-imagick php71w-gd php71w-process php71w-mcrypt php71w-intl php71w-mbstring php71w-recode php71w-tidy php71w-xml php71w-soap php71w-xmlrpc php71w-mysqlnd php71w-pdo php71w-pecl-redis

加到开机启动

systemctl enable php71-fpm

Ps. Linux Version: Oracle Linux Server release 7.3 (GNU/Linux 4.1.12-61.1.28.el7uek.x86_64)

相关文章
相关标签/搜索