-
-
Save felipepodesta/7662925 to your computer and use it in GitHub Desktop.
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
| ###################################################################################################### | |
| # Import into /etc/skel/ the default files for every user. It can be usefull to add in .bash_aliases # | |
| ###################################################################################################### | |
| list-rc(){ | |
| ls -l /etc/rc?.d/*$1 | |
| } | |
| alias df='df -h' | |
| alias du='du -h' | |
| # Create a group named "admin" or change the name in the visudo to "adm". | |
| # Now you can create a new user in this group, to make it a sudoer automatically. | |
| adduser --gid {admin group id} {username} | |
| ################## | |
| # Install screen # | |
| ################## | |
| apt-get install screen | |
| # Copy screen settings into /home/{username}/.screenrc | |
| hardstatus on | |
| hardstatus alwayslastline | |
| hardstatus string "%w%=%l - %d/%m/%Y %c:%s" | |
| # Now log out, log in with {username} and start screen | |
| ############################# | |
| # Upgrade the entire system # | |
| ############################# | |
| apt-get update | |
| apt-get upgrade | |
| ####################### | |
| # Install LAMP server # | |
| ####################### | |
| # Add php 5.4 repository | |
| apt-get install python-software-properties | |
| add-apt-repository ppa:ondrej/php5 | |
| apt-get update | |
| apt-get install apache2 # Now you can test if the server is up | |
| # Create the group and the user for the server | |
| addgroup --system webservergroup | |
| adduser --system --home /var/www --no-create-home --ingroup webservergroup --disabled-login webserveruser | |
| vi /etc/apache2/envvars # And change "APACHE_RUN_USER" and "APACHE_RUN_GROUP" with their respectives | |
| service apache2 restart | |
| # Create the scripts for creating and destroying websites and everything related | |
| apt-get install php5 libapache2-mod-php5 # Now you can test a php page if it works (page must be in /var/www/) | |
| apt-get install mysql-server | |
| vi /etc/mysql/my.cnf # Search for "bind-address" and change "127.0.0.1" with the absolute one | |
| apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin | |
| ################### | |
| # Install ProFTPd # | |
| ################### | |
| apt-get install proftpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment