Cho phép user sửa file của www-data
sudo adduser <username> www-data sudo chown -R www-data:www-data /var/www sudo chmod -R g+rwX /var/www
sudo adduser <username> www-data sudo chown -R www-data:www-data /var/www sudo chmod -R g+rwX /var/www
To Change the SSH Port for Your Linux Server Connect to your server via SSH (more info). Switch to the root user (more info). Run the following command: vi /etc/ssh/sshd_config Locate the following line: # Port 22 Remove # and change 22 to your desired port number. Restart the sshd service by running the following command: . . . Read more
Sometimes you need to open a port on your server, you want it to be recheable only from specific IP address, you can use Iptables for this: iptables -I INPUT -p tcp -s 118.70.15.19 –dport 22 -j ACCEPT In that case, you are opening ssh port only to IP 10.1.1.2, . . . Read more
find 2015/ *.{jpeg,jpg} -exec jpegoptim –size=300k {} \; find images_folder/ *.png -exec optipng {} \;
Sorry you have no rights to view this entry!
$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2 $ sudo yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo $ sudo yum install docker-ce -y $ sudo usermod -aG docker $(whoami) $ sudo systemctl enable docker.service $ sudo systemctl start docker.service $ sudo yum install epel-release -y $ sudo yum install -y python-pip $ sudo pip . . . Read more
cp /etc/localtime /etc/localtime.old ln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime