Install Mono on Ubuntu

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

References :
http://www.mono-project.com/docs/getting-started/install/linux/

Install Android SDK on Ubuntu

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo gedit /etc/profile
sudo gedit /etc/profile
sudo gedit /etc/profile

add :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#AndroidDev PATH
export PATH=${PATH}:/opt/android-sdk-linux/tools
export PATH=${PATH}:/opt/android-sdk-linux/platform-tools
#AndroidDev PATH export PATH=${PATH}:/opt/android-sdk-linux/tools export PATH=${PATH}:/opt/android-sdk-linux/platform-tools
#AndroidDev PATH
export PATH=${PATH}:/opt/android-sdk-linux/tools
export PATH=${PATH}:/opt/android-sdk-linux/platform-tools

at the end run the following command to refresh profile or restart your system

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
. /etc/profile
. /etc/profile
. /etc/profile

Or
add this to ~/.bashrc :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
export ANDROID_HOME=/<installation location>/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export ANDROID_HOME=/<installation location>/android-sdk-linux export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export ANDROID_HOME=/<installation location>/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

References
https://help.ubuntu.com/community/AndroidSDK
https://developer.android.com/studio/install.html

Configure Xdebug for debugging PHP on Ubuntu

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install php5-xdebug
sudo apt-get install php5-xdebug
sudo apt-get install php5-xdebug
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
find / -name 'xdebug.so'
find / -name 'xdebug.so'
find / -name 'xdebug.so'

Now update the options in PHP.INI – /etc/php5/apache2/php.ini

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# Added for xdebug
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
# Added for xdebug zend_extension="/usr/lib/php5/20121212/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.max_nesting_level=300
# Added for xdebug
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300

Restart Apache2, and you are ready to go!

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo service apache2 restart
sudo service apache2 restart
sudo service apache2 restart

References :
http://ubuntuforums.org/showthread.php?t=525257
http://wylbur.us/2014-06-17-add-xdebug-to-ubuntu-1404
http://purencool.com/installing-xdebug-on-ubuntu
https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html

Install user fonts on Ubuntu

copy fonts to one of these folders :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$Home/.fonts/
$Home/.fonts/
$Home/.fonts/
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$HOME/.local/share/fonts/
$HOME/.local/share/fonts/
$HOME/.local/share/fonts/
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/usr/share/fonts
/usr/share/fonts
/usr/share/fonts
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/usr/local/share/fonts/truetype
/usr/local/share/fonts/truetype
/usr/local/share/fonts/truetype

then run this command or restart your system :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo fc-cache -fv
sudo fc-cache -fv
sudo fc-cache -fv

References :
http://www.wikihow.com/Install-TrueType-Fonts-on-Ubuntu
http://askubuntu.com/questions/533462/how-do-i-uninstall-a-font-installed-using-gnome-font-viewer
https://askubuntu.com/questions/191778/how-to-install-many-font-files-quickly-and-easily

Install WordPress on Ubuntu

Install Apache

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install apache2
sudo apt-get install apache2
sudo apt-get install apache2

Install MySQL

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install mysql-server php5-mysql
sudo apt-get install mysql-server php5-mysql
sudo apt-get install mysql-server php5-mysql

Install PHP

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-curl
sudo apt-get install php5-cli
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-curl sudo apt-get install php5-cli
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-curl
sudo apt-get install php5-cli

Create a MySQL Database and User for WordPress

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
mysql -u root -p
create database wordpressdb;
create user wordpressuser@localhost identified by 'pass1234';
grant all privileges on wordpressdb.* to wordpressuser@localhost;
FLUSH PRIVILEGES;
exit
mysql -u root -p create database wordpressdb; create user wordpressuser@localhost identified by 'pass1234'; grant all privileges on wordpressdb.* to wordpressuser@localhost; FLUSH PRIVILEGES; exit
mysql -u root -p
create database wordpressdb;
create user wordpressuser@localhost identified by 'pass1234';
grant all privileges on wordpressdb.* to wordpressuser@localhost;
FLUSH PRIVILEGES;

exit

Download WordPress

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wget http://wordpress.org/latest.tar.gz
wget http://wordpress.org/latest.tar.gz
wget http://wordpress.org/latest.tar.gz

or

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install wordpress
sudo apt-get install wordpress
sudo apt-get install wordpress
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install php5-gd libssh2-php
sudo apt-get install php5-gd libssh2-php
sudo apt-get install php5-gd libssh2-php

The group ownership we will give to our web server process, which is www-data. This will allow Apache to interact with the content as necessary.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo chown -R :www-data /var/www/html/wordpress
sudo chown -R :www-data /var/www/html/wordpress
sudo chown -R :www-data /var/www/html/wordpress

MySQL Error: : ‘Access denied for user ‘root’@’localhost’

  1. Open & Edit /etc/my.cnf or /etc/mysql/my.cnf, depending on your distro.
  2. Add skip-grant-tables under [mysqld]
  3. Restart Mysql
  4. You should be able to login to mysql now using the below command mysql -u root -p
  5. Run mysql> flush privileges;
  6. Set new password by ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
  7. Go back to /etc/my.cnf and remove/comment skip-grant-tables
  8. Restart Mysql
  9. Now you will be able to login with the new password mysql -u root -p

Refernces :

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
https://kyup.com/tutorials/install-wordpress/
https://help.ubuntu.com/community/WordPress
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
https://stackoverflow.com/questions/41645309/mysql-error-access-denied-for-user-rootlocalhost

Upgrade Ubuntu

At first you need to confirm that /etc/update-manager/release-upgrades file has the following line:

Prompt=normal

If Prompt has any other value e.g. lts or never, change it to Prompt=normal.

Now you can run the following command to upgrade your Lubuntu 14.04 to Lubuntu 14.10:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo do-release-upgrade
sudo do-release-upgrade
sudo do-release-upgrade

References :

http://askubuntu.com/questions/423942/change-password-on-root-user-and-user-account

How to Disable, Stop or Uninstall Apport Error Reporting

Stop Apport

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo service apport stop
sudo service apport stop
sudo service apport stop

Disable Apport at Boot

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo nano /etc/default/apport
sudo nano /etc/default/apport
sudo nano /etc/default/apport

Uninstall Apport

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo nano /etc/default/apport
sudo nano /etc/default/apport
sudo nano /etc/default/apport

ShadowSocks PPA

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo add-apt-repository ppa:hzwhuang/ss-qt5