This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update && apt-get upgrade | |
dpkg --add-architecture i386 && apt-get update | |
apt-get install nano wget zip unzip bzip2 linux-kernel-headers tmux ca-certificates curl locales | |
# sources in /etc/apt/sources.list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First off, you'd better use SFTP that comes with the SSH protocol on default port 22. | |
# > Nothing to configure to get it working as long as you got an SSH server. | |
# If you wish to install an FTP server anyways, then: | |
# Uninstall any other FTP | |
apt-get remove --purge your_previous_ftp_server | |
# Update your package list and programs and install proftpd | |
apt-get update && apt-get upgrade | |
apt-get install proftpd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hostname | |
hostname | |
hostname -f | |
nano /etc/hostname | |
nano /etc/hosts | |
shutdown -r now | |
hostname | |
hostname -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# According to my tutorial, make sure you got a dedicated user for the website | |
adduser username | |
# Getting Wordpress | |
cd /home/username/public_html | |
wget https://wordpress.org/latest.tar.gz | |
tar -zxvf latest.tar.gz | |
rm latest.tar.gz | |
mv wordpress/* . | |
rm -R wordpress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Permissions | |
Change permissions for user, groups, and others on files and directories. | |
## Command | |
chmod | |
## Syntax | |
chmod -destination+-permissions /path/to/dir/or/file | |
### Recursive argument |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is targetted towards people using a user for each website. | |
# Give back its own files to your user | |
chown -R user:user ~user/public_html | |
# Copy user permissions to group permissions | |
chmod -R g=u ~user/public_html | |
# Disallow other users from everything on your files | |
chmod -R o-rwx ~user/public_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Settings | |
subdir="manyiles" | |
echo "Starting" | |
echo "How many files do you wanna generate ?" | |
read -r amount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Swap strengh (between 0-100) > Lowest value == less swap | |
sysctl vm.swappiness=X | |
# Permanently store this value | |
/etc/sysctl.conf | |
# Disable Swap | |
swapoff -a | |
# Enable Swap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update the system | |
apt update && apt upgrade | |
# Add 32 bit architecture support (game servers) | |
dpkg --add-architecture i386 && apt update | |
# Install basic packages | |
apt install nano wget zip unzip bzip2 linux-kernel-headers tmux ca-certificates curl locales | |
# Reminder: sources for apt are in: /etc/apt/sources.list | |
# Chaning hostname | |
hostname #insernamehere |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Your serialized data | |
$option_value = 'a:100:[...]'; | |
$data = unserialize($option_value); | |
// Data to replace directly within variable | |
$data['footer_text'] = '<a href="https://www.lrob.fr">Webmaster lrob.fr</a>'; | |
// We serilize data back |