I installed Ubuntu Server 18.04 with the LVM option and left the default partition setup. Now my main drive only has 4GB in a 1TB hard drive. How can I fix this without starting from scratch?
Results of df -h :
Filesystem Size Used Available Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 32G 1.7M 32G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 3.9G 3.6G 92M 98% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop0 87M 87M 0 100% /snap/core/4917
/dev/loop1 3.2M 3.2M 0 100% /snap/stress-ng/471
/dev/loop2 90M 90M 0 100% /snap/core/6130
/dev/sda2 976M 143M 766M 16% /boot
tmpfs 3.2G 0 3.2G 0% /run/user/1000
Resolution: Continue reading “Ubuntu Server 18.04 LVM out of space with improper default partitioning” »
To remove virtualbox
sudo dpkg --list virtualbox-*
sudo apt autoremove --purge virtualbox*
dpkg -l virtualbox* | grep ^i
Remove all PPAs from sources.list and source.list.d directory
sudo mv /etc/apt/sources.list.d/* ~/apt-tmp
Make sure there is nothing except official repositories sources in /etc/sources.list. And update your sources:
sudo apt update
Now we can search to see which versions are available to install:
apt-cache madison virtualbox | grep -iv sources
Which produces an output like this:
virtualbox | 5.0.32-dfsg-0ubuntu1.16.04.2 | http://mirrors.kernel.org/ubuntu xenial-updates/multiverse amd64 Packages
virtualbox | 5.0.18-dfsg-2build1 | http://mirrors.kernel.org/ubuntu xenial/multiverse amd64 Packages
Then I would install the last version mentioned in xenial-updates: Continue reading “Reinstall VirtualBox on Ubuntu & CentOS” »
This will install Zoneminder by using a shell script with one basic command (how easy is that!).
You will need a Ubuntu 18.04 install with LAMP (Apache, MySQL and PHP) installed desktop or server. As an alternate you may use Mariadb in lieu of MySQL
Shell script file contents:
read -p "This script installs Zoneminder 1.32.x on Ubuntu 18.04 AMD64 with LAMP (MySQL) installed...
Press Enter to continue or Ctrl + c to quit" nothing
read -p "You must be logged in as root using sudo su ...
Press Enter to continue or Ctrl + c to quit" nothing
read -p "Next we will add the PPA repository, install and configure the system to run Zoneminder.
Press enter to continue" nothing
apt install -y software-properties-common
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
apt install -y zoneminder
systemctl enable zoneminder
service zoneminder start
adduser www-data video
chown -R www-data:www-data /usr/share/zoneminder/
service apache2 reload
read -p "Install complete.Press enter to continue" nothing
Copy the contents of the script, open a terminal and run: Continue reading “Install Zoneminder on Ubuntu 18.04 with shell script” »
GitLab is an open source GIT repository manager based on Rails and developed by GitLab Inc. It is a web-based GIT repository manager that allows your team to work on code, track bugs and feature requests and to test and deploy applications. GitLab provides features like a wiki, issue tracking, code reviews, activity feeds and merge management. It is capable of hosting multiple projects.
GitLab is available in four editions:
- Gitlab CE (Community Edition) – self-hosted, free and support from the Community forum.
- Gitlab EE (Enterprise Edition) – self-hosted, paid app, comes with additional features.
- GitLab.com – SaaS, free.
- GitLab.io – Private GitLab instance managed by GitLab Inc.
In this tutorial, I will show you step-by-step how to install GitLab CE (Community Edition) on your own Ubuntu 16.04 Xenial Xerus server. In this tutorial, I will be using the ‘omnibus’ package provided by GitLab for easy installation.
What we will do:
- Install Packages
- Install GitLab
- Configure GitLab URL
- Generate SSL Let’s encrypt and DHPARAM Certificate
- Enable Nginx HTTPS for GitLab
- Configure UFW Firewall
- Perform the GitLab Installation
- Ubuntu 16.04 Server – 64bit
- Min RAM 2GB
- Root Privileges
Step 1 – Install required Ubuntu Packages
The first step is to install the packages needed for the GitLab installation. Please log in to the server as root user and upddate the Ubuntu repository.
Now install the packages including curl for downloading the GitLab repository, ca-certificates, and postfix for the SMTP configuration. Install all packages with the apt command below.
sudo apt install curl openssh-server ca-certificates postfix
During postfix installation, you will be prompted about the configuration, select ‘Internet Site’. and then enter the server domain name that shall be used for sending an email. Continue reading “How to Install and Configure GitLab on Ubuntu 16.04” »
Display the Current Hostname
To view the current hostname, enter the following command:
As you can see in the image above, the current hostname is set to ubuntu1804.localdomain.
Change the Hostname
The following steps outline how to change the hostname in Ubuntu 18.04.
1. Change the hostname using hostnamectl
In Ubuntu 18.04 we can change the system hostname and related settings using the command hostnamectl.
For example, to change the system static hostname to linuxize, you would use the following command: Continue reading “How to Change Hostname on Ubuntu 18.04” »
Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:
Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter. Continue reading “Reset Ubuntu 12 root password” »
Do a quick search under the usual jetty folders:
find /opt/zimbra/jetty/ -type f -name *jsp -mtime -30
If you find files like:
you’re actually hacked.
Unlike the previous “zmcat” and “dblaunchs” that actually exploit the vuln and load some sh*t this looks like a bad childish attack. It seems that they delete some files under jetty dir, don’t know why.
The attack vector is the same, but, there are no strange processes, there is no persistence. Continue reading “SOLVED Zimbra 8.6 HTTP ERROR 404 Problem accessing /public/error.jsp. Reason: /public/error.jsp” »
Today we will setup a Site to Site ipsec VPN with Strongswan, which will be configured with PreShared Key Authentication.
After our tunnels are established, we will be able to reach the private ips over the vpn tunnels.
Get the Dependencies:
Update your repository indexes and install strongswan:
$ apt update && sudo apt upgrade -y
$ apt install strongswan -y
Set the following kernel parameters:
$ cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
$ sysctl -p /etc/sysctl.conf
Generate Preshared Key:
We will need a preshared key that both servers will use: Continue reading “Setup a Site to Site IPsec VPN With Strongswan and PreShared Key Authentication” »
Step 1: Generating the certificate
First, let’s create a place to store the file.
Generate CSR and private key.
openssl req -x509 -newkey rsa:4096 -keyout apache.key -out apache.crt -days 365 -nodes
It will ask for information for the certificate request. Complete with the appropriate information.
Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: FL
Locality Name (eg, city) : Miami
Organization Name (eg, company) [My Company]: My Company
Organizational Unit Name (eg, section) :
Common name should be your domain name or the server’s IP address. Also, fill in your email. Continue reading “Configure Apache With Self-Signed TLS/SSL Certificate on Ubuntu 16.04” »
Check your PHP version installed
Before we start, we can simply type the following command to check the existing PHP version installed on the server.
$ php -v
If you installed Ubuntu 16.04 LTS, you will get PHP 7.0.30 installed on your server by running installation script from VestaCP. In this tutorial, we will upgrade our PHP version to 7.2 to enjoy more features and bug fixes.
Check your PHP modules installed
To check installed PHP modules in Ubuntu, type the following command (as Ubuntu makes PHP modules available via packages):
$ dpkg — get-selections | grep -v deinstall | grep php7.0
Remember mark installed modules list, as you need to install them again after upgraded to PHP 7.2. We don’t need to install mcrypt as it has been dropped from PHP 7.2.
In this tutorial, we need to install those modules again: Continue reading “Upgrade PHP version to 7.2 from 7.0 on Ubuntu 16.04” »