Friday, February 10, 2017

HOWTO : Ajenti 1.x on Ubuntu Server 16.04 LTS

Ajenti is an Admin Control Panel for your Linux server. However, Ajenti 2.x is buggy and it is not working properly when I am testing it. Fortunately, Ajenti 1.x still working for Ubuntu 16.04 LTS even it's documentation is written for Ubuntu 12.04.

You can access your Linux server via web browser instead of SSH.

Step 1 :

wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -

Step 2 :

sudo touch /etc/apt/sources.list.d/ajenti.list
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" | sudo tee -a /etc/apt/sources.list.d/ajenti.list


Step 3 :

sudo apt-get update && sudo apt-get install ajenti

sudo systemctl restart ajenti

Step 4 :

To access Ajenti, you open the broswer and point it to your server IP. Username is "root" and password is "admin".

https://[server_ip]:8000

That's all! See you.


Tuesday, February 07, 2017

HOWTO : Optimize Ubuntu 16.04 LTS and Kali Linux 2016.2 with jemalloc

jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. It is the best allocators for a broad range of demanding applications, and eliminating/mitigating weaknesses that have practical repercussions for real world applications.

Step 1 :

Option 1 : Compile from source (latest version)

*** This option is not recommended for Ubuntu 16.04 LTS Desktop and Kali Linux 2016.2. When using in Ubuntu 16.04 LTS Desktop, Firefox will be crashed when 2 or more instances are opened. Meanwhile, Kali Linux 2016.2 requires redis-server which is using stock version of libjemalloc1 by default. redis-server for Ubuntu 16.04 also requires stock version of libjemalloc1.

git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
./autogen.sh
make dist
make
sudo make install


The final files "libjemalloc.*" are located at "/usr/local/lib/".

touch /etc/ld.so.preload

echo "/usr/local/lib/libjemalloc.so" | sudo tee --append /etc/ld.so.preload

Option 2 : Install package (usually older version)

This option is recommended for Ubuntu 16.04 LTS and Kali Linux 2016.2.

sudo apt-get install libjemalloc1 libjemalloc-dev

The final files "libjemalloc.*" are located at "/usr/lib/x86_64-linux-gnu/".

touch /etc/ld.so.preload

echo "/usr/lib/x86_64-linux-gnu/libjemalloc.so" | sudo tee --append /etc/ld.so.preload

sudo ln -s /usr/lib/x86_64-linux-gnu/libjemalloc.so.1 /usr/lib/x86_64-linux-gnu/libjemalloc.so

Step 2 :

Reboot your box.

Step 3 :

To confirm it is running properly (for example, firefox is running with it) :

sudo lsof -E | grep libjemalloc | grep firefox

That's all! See you.