Last active
August 29, 2015 14:28
-
-
Save yashodhank/7d38d9ab7c32d12c3e22 to your computer and use it in GitHub Desktop.
Perfect Ubuntu 14
This file contains 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
#SSD only | |
sudo vim /etc/fstab | |
# remove relatime if present and add noatime | |
#example UUID=3df036c6-8244-49d1-afe4-a3a808e32eeb / ext4 noatime,errors=remount-ro 0 1:x | |
sudo vim /etc/udev/rules.d/99-ssd.rules | |
# all non-rotational block devices use 'deadline' scheduler | |
# mostly useful for SSDs on desktops systems | |
SUBSYSTEM=="block", ATTR{queue/rotational}=="0", ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="deadline" | |
#Decrease Grub time to boot | |
sudo vim /etc/default/grub | |
#Add | |
GRUB_TIMEOUT=2 | |
#run | |
sudo update-grub | |
#Swapiness and cache pressure | |
sudo vim /etc/sysctl.conf | |
#Add to the end | |
vm.swappiness=0 | |
vm.vfs_cache_pressure=50 | |
#Allow page cache to be shared | |
sudo su | |
echo 1 > /sys/kernel/mm/ksm/run | |
exit | |
#if you only use apps in english do not download other languages | |
sudo vim /etc/apt/apt.conf.d/00aptitude | |
#Add this line on the end | |
Acquire::Languages "none"; | |
#enable all multiverse | |
sudo sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list | |
#add all sources you will need, virtualbox, chrome, Java7 skype, copy, everpad, gimp, pantheon, plank, btsync | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'; sudo add-apt-repository -y ppa:webupd8team/java; sudo apt-add-repository "deb http://archive.canonical.com/ubuntu/ precise partner"; sudo add-apt-repository -y ppa:git-core/ppa; wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -; sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'; sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp;sudo add-apt-repository -y ppa:paolorotolo/copy;sudo add-apt-repository -y ppa:nvbn-rm/ppa;sudo add-apt-repository -y ppa:ricotz/docky;sudo add-apt-repository -y ppa:tuxpoldo/btsync;sudo add-apt-repository -y ppa:linrunner/tlp;sudo add-apt-repository -y ppa:mc3man/trusty-media;sudo apt-add-repository -y ppa:pipelight/stable;sudo add-apt-repository -y ppa:danjaredg/jayatana;sudo add-apt-repository -y ppa:audacity-team/daily;sudo add-apt-repository -y ppa:nilarimogard/webupd8;sudo apt-add-repository -y ppa:pipelight/stable;udo add-apt-repository -y ppa:chris-lea/node.js | |
sudo sh -c "echo 'deb http://repository.spotify.com stable non-free' >> /etc/apt/sources.list" | |
#UPDATE | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59;sudo apt-get update; sudo apt-get dist-upgrade; | |
#Install newer git, virtualbox, chrome, Java7 skype, copy, everpad, DVD, compression, gimp, gedit, btsync | |
sudo apt-get install libdvdread4 && sudo /usr/share/doc/libdvdread4/install-css.sh | |
sudo apt-get install oracle-java7-installer skype git virtualbox-4.3 gimp gimp-data gimp-plugin-registry gimp-data-extras google-chrome-stable ubuntu-restricted-extras unace unrar zip unzip xz-utils p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller gedit gedit-plugins copy everpad plank btsync-gui synaptic vlc flashplugin-installer libxine1-ffmpeg mencoder flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview libmpeg3-1 mpeg3-utils mpegdemux liba52-dev mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 totem-mozilla icedax lame libmad0 libjpeg-progs libdvdcss2 libdvdread4 libdvdnav4 libswscale-extra-2 ubuntu-restricted-extras ubuntu-wallpapers* unity-tweak-tool gnome-tweak-tool tlp tlp-rdw spotify-client gstreamer0.10-ffmpeg gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386 sni-qt:i386 pipelight-multi jayatana audacity lame libmp3lame0 pinta acroread cheese samba samba-common gdebi icedtea-plugin openshot python-glade2 system-config-samba typecatcher terminator linux-firmware-nonfree preload nodejs comerr-dev curl git-core krb5-multidev libcurl4-openssl-dev libgcrypt11-dev libgnutls-dev libgnutlsxx27 libgpg-error-dev libgssrpc4 libidn11-dev libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-7 libkrb5-dev libldap2-dev libp11-kit-dev libreadline-dev libreadline6-dev librtmp-dev libsqlite3-dev libssl-dev libssl-doc libtasn1-6-dev libtinfo-dev libxml2-dev libxslt1-dev libyaml-0-2 libyaml-dev python-software-properties sqlite3 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev php5-fpm dnsmasq php5-dev php-pear libterm-readkey-perl | |
gsettings set org.gnome.settings-daemon.plugins.background active true | |
sudo pipelight-plugin --enable silverlight | |
sudo apt-get install netflix-desktop | |
git config --global color.ui true | |
git config --global user.name "Handrus" | |
git config --global user.email "handrus@gmail.com" | |
#hibernate http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/ | |
#follow http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/ | |
#remove zeitgeist, gnome online indicator and telepathy and shitty apps | |
zeitgeist-daemon --quit; sudo apt-get --purge autoremove -y deja-dup indicator-messages empathy-* gnome-online-accounts activity-log-manager-common activity-log-manager-control-center zeitgeist zeitgeist-core zeitgeist-datahub software-center modemmanager geary;sudo apt-get -f install;sudo apt-get autoremove -y;sudo apt-get autoclean -y | |
sudo rm -fr {/root,/home/*}/.local/share/zeitgeist | |
wget -q -O - https://fixubuntu.com/fixubuntu.sh | bash | |
#terminator guake-like | |
mkdir ~/.config/terminator | |
vim ~/.config/terminator/config | |
[global_config] | |
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler | |
always_on_top = True | |
tab_position = bottom | |
sticky = True | |
[keybindings] | |
hide_window = F12 | |
[profiles] | |
[[default]] | |
background_darkness = 0.75 | |
background_type = transparent | |
foreground_color = "#ffffff" | |
[layouts] | |
[[default]] | |
[[[child0]]] | |
position = 0:24 | |
type = Window | |
order = 0 | |
parent = "" | |
size = 1679, 298 | |
[[[child1]]] | |
position = 839 | |
type = HPaned | |
order = 0 | |
parent = child0 | |
[[[terminal3]]] | |
profile = default | |
type = Terminal | |
order = 1 | |
parent = child1 | |
[[[terminal2]]] | |
profile = default | |
type = Terminal | |
order = 0 | |
parent = child1 | |
[[original]] | |
[[[child1]]] | |
type = Terminal | |
parent = window0 | |
profile = default | |
[[[window0]]] | |
type = Window | |
order = 0 | |
parent = "" | |
[plugins] | |
#lamp | |
sudo sed -i "s/listen =.*/listen = 127.0.0.1:9000/" /etc/php5/fpm/pool.d/www.conf | |
sudo add-apt-repository -y ppa:ondrej/apache2; sudo apt-key update;sudo apt-get update;sudo apt-get install -y apache2 | |
sudo a2enmod proxy_fcgi rewrite vhost_alias ssl | |
sudo cp /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf.bkp | |
sudo vim /etc/apache2/sites-enabled/000-default.conf | |
<VirtualHost *:80> | |
ServerName localhost | |
ServerAlias *.dev | |
VirtualDocumentRoot /var/www/%1/docroot | |
# Virtual host permissions | |
<Directory "/var/www/%1/docroot"> | |
Options +SymLinksIfOwnerMatch | |
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,MultiViews | |
Require all granted | |
</Directory> | |
# n.b. Needs Apache 2.4.10 or newer. | |
<FilesMatch \.php$> | |
SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost" | |
</FilesMatch> | |
# n.b. Remove `FilesMatch` section above and uncomment this for older Apache. | |
# ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php5-fpm.sock|fcgi://./srv/dev/%1/public_html/$1 | |
</VirtualHost> | |
sudo gpasswd -a "$USER" www-data;sudo chown -R "$USER":www-data /var/www; | |
find /var/www -type f -exec chmod 0660 {} \; | |
sudo find /var/www -type d -exec chmod 2770 {} \; | |
sudo vim /etc/dnsmasq.conf | |
# add to the file | |
listen-address=127.0.0.1 | |
address=/.dev/127.0.0.1 | |
sudo service dnsmasq restart | |
host test.dev | |
sudo mkdir /etc/apache2/ssl | |
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt | |
sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf.bkp | |
sudo vim /etc/apache2/sites-available/default-ssl.conf | |
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
DocumentRoot /var/www/ | |
VirtualDocumentRoot /var/www/%0 | |
VirtualScriptAlias /var/www/cgi-bin/ | |
LogLevel warn | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/apache.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/apache.key | |
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
SSLOptions +StdEnvVars | |
</FilesMatch> | |
<Directory /usr/lib/cgi-bin> | |
SSLOptions +StdEnvVars | |
</Directory> | |
# Virtual host permissions | |
<Directory "/var/www/%1/docroot"> | |
Options +SymLinksIfOwnerMatch | |
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,MultiViews | |
Require all granted | |
</Directory> | |
# n.b. Needs Apache 2.4.10 or newer. | |
<FilesMatch \.php$> | |
SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost" | |
</FilesMatch> | |
BrowserMatch "MSIE [2-6]" \ | |
nokeepalive ssl-unclean-shutdown \ | |
downgrade-1.0 force-response-1.0 | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
</VirtualHost> | |
</IfModule> | |
sudo a2ensite default-ssl.conf | |
sudo service apache2 restart | |
#access https://test.dev | |
sudo pear channel-discover pear.drush.org | |
sudo pear install drush/drush | |
drush version | |
cd ~ | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
composer global require drupal/coder:\>7 | |
vim .bashrc | |
#add the folowing line at the end | |
alias phpcs="~/.composer/vendor/bin/phpcs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment