DigitalOcean Cloud Config: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 9: | Line 9: | ||
yum -y install yum-utils | yum -y install yum-utils | ||
yum -y groupinstall development | yum -y groupinstall development | ||
== Install Ruby 2.0 == | == Install Ruby 2.0 == | ||
Line 18: | Line 17: | ||
yum install httpd | yum install httpd | ||
yum install php | yum install php | ||
apachectl restart | apachectl restart | ||
systemctl status httpd | systemctl status httpd | ||
Line 28: | Line 28: | ||
yum remove php-cli mod_php php-common | yum remove php-cli mod_php php-common | ||
yum install mod_php70u php70u-cli php70u-mysqlnd | yum install mod_php70u php70u-cli php70u-mysqlnd | ||
apachectl restart | apachectl restart | ||
systemctl status httpd | systemctl status httpd | ||
Line 51: | Line 52: | ||
python3.6 -m venv venv | python3.6 -m venv venv | ||
source venv/bin/activate | source venv/bin/activate | ||
# check version of python & pip | # check version of python & pip | ||
pip -V | pip -V | ||
Line 81: | Line 82: | ||
# overwrite history | # overwrite history | ||
history -w | history -w | ||
# delete by offset | # delete by offset | ||
history -d 1 | history -d 1 | ||
history -w | history -w |
Revision as of 07:16, 1 December 2017
Initial Config
- Create a Droplet of Centos7
- Add SSH before create Croplet
- Add domain
YUM Update
sudo su yum -y update yum -y install yum-utils yum -y groupinstall development
Install Ruby 2.0
yum install ruby ruby -v
Install PHP 5.4
yum install httpd yum install php
apachectl restart systemctl status httpd
Update PHP 7.0
cd ~ curl 'https://setup.ius.io/' -o setup-ius.sh bash setup-ius.sh yum remove php-cli mod_php php-common yum install mod_php70u php70u-cli php70u-mysqlnd
apachectl restart systemctl status httpd
mkdir -p /var/www/html/test # write phpinfo() code here vi /var/www/html/test/test.php
Install Python 3.6
# centos7.iuscommunity.org yum -y install https://centos7.iuscommunity.org/ius-release.rpm yum -y install python36u
# check your python version python3.6 -V # install pip for Python 3.6 yum -y install python36u-pip yum -y install python36u-devel
# configure virtual env cd /opt/;mkdir dev pro;cd dev python3.6 -m venv venv source venv/bin/activate
# check version of python & pip pip -V python -V deactivate
Install MySQL
cd ~ yum install wget wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm md5sum mysql57-community-release-el7-9.noarch.rpm rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum install mysql-server systemctl start mysqld systemctl status mysqld
grep 'temporary password' /var/log/mysqld.log mysql_secure_installation mysqladmin -u root -p version
mysql -u root -p mysql -h localhost -u root -p mysql -h 127.0.0.1 -u root -p
Bash History
# clear all history history -c # overwrite history history -w
# delete by offset history -d 1 history -w