1) Install POSTGRESQL
sudo apt update
sudo apt install -y postgresql postgresql-contrib
CREATE DATABASE name_db OWNER user_name;
GRANT ALL
PRIVILEGES ON DATABASE name_db TO user_name;
https://techstreaks.com
1) Install POSTGRESQL
sudo apt update
sudo apt install -y postgresql postgresql-contrib
CREATE DATABASE name_db OWNER user_name;
GRANT ALL
PRIVILEGES ON DATABASE name_db TO user_name;
In AWS console:
EC2 → Instances
Select your instance
Actions → Image and templates → Create Image
Wait until AMI is ready.
Go to:
EC2 → AMIs
Select AMI
Actions → Copy AMI
Destination region → US East (N. Virginia)
Switch region to N. Virginia
EC2 → AMIs → Launch instance
Your server will start in us-east-1.
You will get a new public IP, which we can configure it in our DNS.
sudo fallocate -l 2G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=2048
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
# optional but recommended
echo 'vm.swappiness=20' | sudo tee /etc/sysctl.d/99-swappiness.conf
sudo sysctl -p /etc/sysctl.d/99-swappiness.conf
free -h
swapon --show
STEP 1 — Create the Subdomain
cPanel → Domains → Create A New Domain (or Subdomains)
cPanel will automatically create:
/home/egproject/test.example.com/
Copy EVERYTHING inside public folder to:
/home/egproject/test.example.com/
So that folder contains:
Change these lines:
FROM:
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
TO:
require __DIR__.'/../test/vendor/autoload.php';
$app = require_once __DIR__.'/../test/bootstrap/app.php';
Because your Laravel core lives in /test.
In File Manager:
Set:
test/storage → 755 test/bootstrap/cache → 755
If errors:
chmod -R 775 storage
chmod -R 775 bootstrap/cache1) Check php version using the command:
php -v
2) Make sure server is using apache php or php cli by using the below command
sudo systemctl status
3) Check if any php-fpm is running. else
sudo nano /etc/php/8.4/cli/php.ini
4) Edit php.ini and change these values from 2M to 10 or 20 M
upload_max_filesize = 10M
post_max_size = 10M
4. Restart web server:
sudo systemctl restart php8.4-fpm
sudo systemctl restart apache2
First, you need to create an App Password from your Google Account:
Go to your Google Account: https://myaccount.google.com/
Click on "Security" in the left menu
Enable "2-Step Verification" if not already enabled
Go back to Security → 2-Step Verification
Scroll down to "App passwords"
Select "Mail" and "Other (Custom name)"
Enter a name like "Laravel App"
Click "Generate"
Copy the 16-character password (no spaces)
Update .env file with the following info:
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-16-char-app-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="your-email@gmail.com"
MAIL_FROM_NAME="${APP_NAME}"
1) Locally run the following commands for the existing repo:
git remote -v
This will help us find the current remote origin
2) Set remote origin to the new repo:
git remote set-url origin git@gitlab.com:folder/repo.git
3) Locally ensure that it is in the correct branch
git checkout import-main
4) if activities were done in a new branch, merge it with the current branch "import main"
git merge main
5) push the code to the git
git push
✅ Step-by-step: Build MyCompany SharePoint Internal Hub
Step 0 — Decide Names (use these)
1️⃣ Create the Main Hub Site (Central Portal)
✅ This becomes your main landing page.
2️⃣ Register it as a Hub Site (Admin Step)
1. Go to https://admin.microsoft.com
2. Select Admin centers → SharePoint
✅ Now you can manage global navigation + consistent branding.
3️⃣ Create Department Sites (Communication Sites)
Repeat these steps for each department:
Create these sites:
4️⃣ Connect Each Site to the Hub (Very important)
For each department site:
✅ Now all sites share the same top navigation style and theme.
5️⃣ Build the Top Menu (Hub Navigation)
· Click ➕ Add link
4. ·
✅ This gives you the “AIU-style” department navigation.
6️⃣ Create the Hub Home Page Layout
A) Add the Banner
B) Add Quick Action Buttons (right side feel)
7️⃣ Create Document Libraries (Core of SharePoint)
Go to each department site and create libraries:
Operations site:
IT & Systems site:
Finance site:
Compliance site:
Events & CME:
How to create a library:
8️⃣ Create Lists for Requests (Forms replacement)
A) IT Support Request List
B) Operations Requests (Optional)
Same concept for Operations.
9️⃣ Setup Permissions (Internal-only)
Since suppliers cannot access, keep it simple:
✅ Recommendation:
🔟 Turn on Versioning (Very important)
For each document library:
This prevents accidental loss.
1️⃣1️⃣ Publish + Test
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql
# Create database and user
sudo -u postgres psql
# In PostgreSQL shell:
CREATE DATABASE myapp;
CREATE USER myuser WITH PASSWORD 'mypassword';
GRANT ALL PRIVILEGES ON DATABASE myapp TO myuser;
\q
# Command line
psql -h localhost -U myuser -d myapp
# Connection string
postgresql://myuser:mypassword@localhost:5432/myapp
DATABASE_URL="postgresql://myuser:mypassword@localhost:5432/myapp"
Keep:
Custom policy → selected
Policy type → EBS snapshot policy
Then click Next step 🟧
Resource type: Select Volume
Target resource tags:
Add the tag you used on your EC2 volume, for example:
Key: Backup
Value: Daily
Only the volumes with this tag will be backed up automatically.
Schedule name: Daily-EC2-Backup (or Weekly if preferred)
Frequency: Every 24 hours (for daily) or Every 7 days (for weekly)
Start time: Choose off-peak (e.g., 02:00 UTC)
Retention type: “Count”
Retain: 7 snapshots (automatically delete older ones)
Enable these options:
☑ Copy tags from source
☑ Exclude boot volumes (optional — keep unchecked if you want full backups including OS)
If this is your first lifecycle policy:
Choose “Create new role for this policy”
AWS will auto-generate permissions for DLM to create/delete snapshots.
Review your policy summary (target tag, schedule, retention, IAM role)
Click Create Policy
After 24 hours (or at next schedule), go to:
👉 EC2 → Snapshots
You’ll see entries like:
“Created by EC2 Lifecycle Policy: Daily-EC2-Backup”
That confirms your automation works.
Run this in your project folder:
git remote -v
You’ll probably see something like:
origin https://github.com/username/reponame (fetch)
origin https://github.com/username/reponame (push)
the usernamegit remote set-url origin https://github.com/username/reponame.git Step 3 — Verify the change
Run again:
git remote -v
You should see:
origin https://github.com/username/reponame (fetch)
origin https://github.com/username/reponame (push)Step 4 — Set your identity (you already did this, but just to confirm)
git config user.name "username"
git config user.email "email@gmail.com"Now push the main branch:
git push -u origin main
If prompted for credentials:
Username:
Password: your GitHub Personal Access Token (PAT) (not your GitHub password)
👉 Create one here: https://github.com/settings/tokens
When creating the token:
Choose “Fine-grained personal access token”
Grant Repository → Read and write access
Copy and paste it when Git asks for your password.
Go to GitHub.com → Settings → Developer settings → Personal access tokens → tokens (classic)
Generate new token with repo permissions
Copy the token
paste it as password during git push -u origin main
valid for 30 days
You’re using Ubuntu with a LAMPP stack (Linux + Apache + MySQL + PHP). Let’s walk through installing and securing phpMyAdmin step by step:
sudo apt update && sudo apt upgrade -y
sudo apt install phpmyadmin -y
👉 During installation, it will ask:
Web server to configure automatically → choose apache2
Configure database for phpMyAdmin → select Yes
Set a phpMyAdmin application password (this is for phpMyAdmin’s own database user, not MySQL root).
If it didn’t auto-enable, manually link phpMyAdmin to Apache:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl reload apache2
Make sure these are enabled:
sudo apt install php-mbstring php-zip php-gd php-json php-curl -y
sudo phpenmod mbstring
sudo systemctl restart apache2
Now open in your browser:
http://your-server-ip/phpmyadmin
Example:
http://34.199.91.21/phpmyadmin
Login using your MySQL root (or another MySQL user you created).
By default, MySQL root may be set to auth_socket instead of a password. Fix:
sudo mysql -u root
Inside MySQL shell:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_strong_password';
FLUSH PRIVILEGES;
EXIT;
Now login in phpMyAdmin with root / your_strong_password.
Since phpMyAdmin is a common attack target:
Change the URL alias (instead of /phpmyadmin → /dbadmin123):
sudo nano /etc/apache2/conf-available/phpmyadmin.conf
Replace /phpmyadmin with /dbadmin123, then:
sudo systemctl reload apache2
Restrict access by IP (allow only your IP).
✅ Done! You now have phpMyAdmin running on your LAMPP server.