Friday, 19 July 2019

How to install TinyCP on Ubuntu

TinyCP is lightweight control panel for Linux system, Ubuntu and Debian base only no CentOS support for now. that provides a wide range of futures like.

  • Domain Management.
  • Webserver (Apache)
  • Database (MariaDB)
  • MailBox
  • FTP
  • Filesharing (Samba)
  • Firewall 
  • VPN (OpenVPN, PPTP)
  • Version Control (Git/SVN)


visit URL https://tinycp.com in download section we need to fill our email ID,

The download instructions will be received on mail ID as following.

The Keypoint I notices the script require Account ID and email to complete the installation.

Run the system as root and copy-paste command.

wget -qO- https://tinycp.com/download/tinycp-install.sh | bash -s -- 1XXXXXXXX youre@registredid.com

The installation will start and it will ask to set a port for control panel login. by default, it's 8080 so I press enter.


After complete installation, it gives URL: your server IP and port
Login : admin
Password : (Random genrated)


I access the URLs by hostname / we can access via IP also.




The design looks good and modern. by clicking on Configuration its asked to install requirements


On Installation page

I click on Mysql/MariDB and Apache install option


Its start process.


After installation we need to click Prepare. then the status will show active.


Now we are ready to create Webserver.

Selected Web Clicked on new Domain



For testing, I selected wordpress.test as it's installed on the local environment but on VPS the domain name should be Registred and fully qualified. and your domain provider needs to add A record and www record pointing to your VPS IP.



Good to see the redirection adding IP and SSL Certificate selection is available by default on the main page


On application Tab its come with WordPress and RoundCube out of the box. as I have not installed mail services RoundCube showing Prerequisites not met.


Let's install WordPress 5.0.3 by clicking install option. we can use an execting database or in my case, I am creating new database testwordpress.




Clicked on Install its shows installation is finished.as security concern the installation created a database with an empty password



clicking on configuration finish. its open new tab and redirect to wp-admin install page by default I selected self sign https page so now its showing connection not private


Same default procedure of WordPress


and it's working out of the box.



Conclusion

Pros: 

  • Lightweight.
  • Simple to manage and configure as own site hosting.
  • Selective option to install services which we require for example not installed mail module on the server.


Cons:

  • Not opensource.
  • License model is integrated as in future any subscription service is introduced by the team we need to purchase services to avail TinyCP price start with $1 Monthly and $10 Annually as per the last announcement by team.
  • Installation requires registration where it clearly indicates Licensing services in future which cleared by TinyCP team.


My Thoughts.
I will stick with Virtualmin for personal or production purchase services. yes in future if TinyCP available as community and opensource I will give a try based on requirements but for now this Virtualmin is better. as I know to host personal Websites you can say up to 3 domains free is good but production where earnings are there or it's more than 3 domain we ready to pay fees to make project alive and active by choice but they should be clear on pricing.

Tuesday, 16 July 2019

How to Fix Ubuntu Linux slow boot issue


As a power user, I prefer to use GNU/Linux OS for my personal daily driver. I don't want to go with any specific distro but any Linux kernel base OS I use for at least 6 to 9 months then change another as an experiment.

Currently, I am using Ubuntu 18.04 on my 2011 Mac Book pro. Yes, I know why Mac book but ill explain simply no Mac OS in Mac Book, Just Linux OS git for settings and preference synchronization Use (i3 WM) for my preferred productivity work, other desktop managers and windows managers for Testing.

So now on the Booting issue first, after installation the system boot time is unnoticeable but then slowly the boot time started to increase after 4 months  so I decided troubleshot using

Command systemd-analyze



its come to my notice something is not right so I deep down the command using

systemd-analyze blame

the first thing to notice is


systemd Journal flush service to fix the issue I perform the following action

Command to see usage journalctl --disk-usage



then output using a command journalctl -b --unit systemd-journald


Output indelicate time spent on flushing and Journal size is around 1.4G up to 4G max but when I think the service is only used for debugging boot faults so use

    Use a journalctl --vacuum command

    Use Help From journalctl -h

        --vacuum-size=BYTES Reduce disk usage below a specified size

        --vacuum-files=INT Leave only the specified number of journal files

        --vacuum-time=TIME Remove journal files older than the specified time

    So the command will be

     sudo journalctl --vacuum-size=100M --vacuum-time=5d --vacuum-files=5


then grep storage command systemctl cat systemd-journal-flush.service  | grep -i storage


its persistent storage so according to man journald.conf





  Storage=

    Controls where to store journal data. One of "volatile", "persistent", "auto" and "none".

    If "volatile", journal log data will be stored only in memory, i.e. below the /run/log/journal hierarchy (which is created if needed).

    If "persistent", data will be stored preferably on disk, i.e. below the /var/log/journal hierarchy (which is created if needed), with a fallback to /run/log/journal (which is created if needed), during early boot and if the disk is not writable.

    "auto" is similar to "persistent" but the directory /var/log/journal is not created if needed so that its existence controls where log data goes.

    "none" turns off all storage, all log data received will be dropped. Forwarding to other targets, such as the console, the kernel log buffer, or a Syslog socket will still work, however. Defaults to "auto".

Changed as attached screen


Then according to systemd developer

Open

sudo vim /lib/systemd/system/systemd-journal-flush.service

changed Before tag.

Reboot the system.


My Windows Terminal Setup

Microsoft just launched windows terminal preview, I am not a good fan of command.exe design as the new Windows terminal looks refreshing interface to work around.

Yes, my Home primary OS is based on GNU/Linux but on the work environment, we need to work on Windows systems.





  • First Windows Subsystem for Linux
  • Second Visual Studio Code
  • Third Windows Terminal (currently in Preview version)


I installed the Windows Terminal (WT) on my windows matching from Microsoft Store where.



and do some modification to fit as per my need.

Setting can be found in JSON file by using command shortcut (Ctrl + ,) or clicking dropdown error next to the plus sign


Which open JSON file of configuration.


First thing I have done is changed shortcut keys to open different window instance

previously its Ctrl + Shift + 1 to 9 but as Indian keyboard Ctrl + Shift + 4 used to add ₹ rupees word.

Now its Ctrl + 1 to 9


Next font Size default 10 to 18 in profiles and Opacity
"fontSize" : 18,
"acrylicOpacity" : 0.75,


Default profile when I open WT it should load my WSL ubuntu 18.04 and direct to my windows profile folder not on a system



added key shortcut to open WT on Windows Ctrl + t.

now any command which I need to test execute its run on Ubuntu bu default. that's increased the compatibility and workaround hassle which we faced a lot when working windows and Linux environment same time.

Future I will be going in-depth on how Windows subsystem for Linux actually help admin to manage and maintain all environment on Single System.

Still, As my preferred distro, I always go with (GNU/Linux).





Ping your blog