安装SnipeIT资产管理平台

1. Update the server and install dependencies:
1
sudo apt update -y && apt upgrade -y
1.1 Install unzip dependency
1
sudo apt-get install unzip git -y
2. Install Apache Webserver
1
sudo apt install apache2 -y

In case, you enabled firewall and firewall block requests of the apache web server,
open a port in the firewall.

1
2
3
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Now, verify the Apache installation. Open browser and test default page.

1
http://localhost

Enable Apache’s mod_rewrite module. Snipe-IT requires this extension to rewrite URLs more cleanly.

1
sudo a2enmod rewrite

Restart your Apache web server to apply the changes.

1
sudo systemctl restart apache2
3. Install MariaDB
1
sudo apt install mariadb-server mariadb-client -y

The default configuration of the MariaDB will not be secured. Let’s secured the installation using the following command:

1
sudo mysql_secure_installation

Once the script gets executed, it will ask multiple questions.
It will ask you to enter the current password for root (enter for none):
Then enter yes/y to the following security questions:

1
2
3
4
5
Set a root password? [Y/n]: y
Remove anonymous users? : y
Disallow root login remotely? : y
Remove test database and access to it? : y
Reload privilege tables now? : y
4. Install PHP and PHP Composer

Here we are installing the default PHP version 8.1 and other modules for web deployments using the following command:

1
sudo apt install php php-common php-bcmath php-bz2 php-intl php-gd php-mbstring php-mysql php-zip php-opcache php-intl php-json php-mysqli php-readline php-tokenizer php-curl php-ldap -y

Install PHP Composer, which is a PHP dependency management tool to install and update libraries in your Snipe-IT.
Download the Composer installer.

1
sudo curl -sS https://getcomposer.org/installer | php

Move the composer.phar executable to /usr/local/bin/.

1
sudo mv composer.phar /usr/local/bin/composer
5. Create a Database

Create a database and database user for Snipe-IT. First login into MySQL/MariaDB as a root user.

1
sudo mysql -u root -p

Run following commands to perform this task:

1
2
3
4
5
CREATE DATABASE snipe_it;
CREATE USER 'snipe_it_user'@'localhost' IDENTIFIED BY 'EXAMPLE_PASSWORD';
GRANT ALL PRIVILEGES ON snipe_it.* TO 'snipe_it_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Note: Replace snipe_it_user to your choice username and replace EXAMPLE_PASSWORD to you choice password.

6. Install Snipe-IT

Navigate to the root directory of your web server.

1
cd /var/www/

Use git to clone the latest Snipe-IT repository from the https://github.com/snipe/snipe-it URL and copy the downloaded files to a snipe-it directory.

1
sudo git clone https://github.com/snipe/snipe-it snipe-it

Switch to the snipe-it directory.

1
cd snipe-it

Snipe-IT ships with a sample configuration file. Copy it to /var/www/snipe-it/.env.

1
sudo cp /var/www/snipe-it/.env.example /var/www/snipe-it/.env

Edit the configuration file.

1
sudo nano /var/www/snipe-it/.env

In the Snipe-IT configuration file, locate these settings.

1
2
APP_URL=null
APP_TIMEZONE='UTC'

Set APP_URL to your server’s Fully Qualified Domain Name, or it’s public IP address. If you use a time zone other than UTC, change the timezone to a PHP-supported timezone, and enclose it in single quotes.

1
2
APP_URL=example.com
APP_TIMEZONE='America/New_York'

Locate these settings.

1
2
3
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null

Change those values to the database information you set up in Step 3.

1
2
3
DB_DATABASE=snipe_it
DB_USERNAME=snipe_it_user
DB_PASSWORD=EXAMPLE_PASSWORD

Save and close the file.

Install the Snipe-IT dependencies with Composer. You’ll receive a warning not to run this as root on each command. It’s okay to continue as root for the Snipe-IT install, so type yes and hit ENTER.

1
2
composer update — no-plugins — no-scripts
composer install — no-dev — prefer-source — no-plugins — no-scripts

Set the correct ownership and permission for the Snipe-IT data directory.

1
2
sudo chown -R www-data:www-data /var/www/snipe-it
sudo chmod -R 777 storage

Once the Composer finishes running, generate a Laravel APP_Key value in the /var/www/snipe-it/.env configuration file you created earlier. Type yes and hit ENTER when prompted to continue.

1
sudo php artisan key:generate
7. Create a Virtual Host File

First we’ll disable default Apacheconf file and create new vhost conf file.
Disable the default Apache configuration file.

1
sudo a2dissite 000-default.conf

Create a new Apache configuration file.

1
sudo nano /etc/apache2/sites-available/snipe-it.conf

Paste the information below and replace example.com with your server’s domain name or public IP address.

1
2
3
4
5
6
7
8
9
10
11
12
13
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/snipe-it/public

<Directory /var/www/snipe-it/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and exit the file

Enable your new configuration file

1
sudo a2ensite snipe-it.conf

Restart your Apache web server to apply the changes.

1
sudo systemctl restart apache2
8. Run the Setup Wizard

Navigate to your browser and access the setup wizard using your server IP or domain name you have mentioned in vhost conf file.

More info : Documentation

总结

人类

当人离开这个世界后,过去大部分的事情都会逐渐释怀也或许不。
最近看了 破·地狱 这部电影挺感触,因为它演出了真实的人性
人 · 来到这世上就已经在倒数
人 · 真正释怀是在即将离世前
人 · 习惯于隐藏自己在乎的事
人 · 习惯于伤害着身边的亲人

一个人知道自己时日不多的时候,会愿意将多年以来的心底话表达出来的原因是什么 ?
因为知道这一刻不说就没有机会,并且遗憾。

既然如此,人为什么不在一开始就试着对在乎的人表达心内话 ?
怕丢脸 ? 怕失望 ? 怕挫败 ? 怕被人笑 ?

人 如今是越来越脆弱,分分钟就会来不及告别而离开


还有可能是友情 ?

善变的确折腾了很久,因为还在乎还持有希望,
但在重复来回着终于彻底接受 “别人重于他人胜于自己,不把当自己一回事” 的事实。
那所谓的 :
“你对他的好,别人也可以做到”
“别人这个年纪已经多少$$$$”
“问题永远是别人”
“自私自利 利用他人”
“双重标准,利益衡量”
“藕断丝连,自以为是”
“对他人有时间,对自己没时间”
“被晾着信息几天不回复,理由既然是忘记”

三观确实重要,活生生的例子”看电影”
我认为是乐趣
她认为是奢侈


职场

依然在探索和学习自己想要追求的技术,虽然说现今已经踏入AI时代,很多资讯可说是轻而易举可以找到和学习,
但是对于未来的方向和竞争也偶尔难免会觉得越来越激烈和迷茫。不过依然确信只是有不断学习和迭代才能有创新的想法和灵感,
不要怀疑自己的方向,坚持的往前走并追求自己想要的知识和科技。

有谁不向”钱”看齐,但是君子爱财取之有道,而非盲目的追求成为被钱左右的钱奴,如果说为了钱可以连自己都出卖,哪是否已经连基本的人性都丢失?
何谓好工作?好做工的定义是什么?我相信这个问题是见仁见智取决于个人的定义。
有得追求平稳低压自由但收入不高;
有得追求高薪但背负高压且不自由。

每个人的际遇不同,如果说某些人在中年以上才实现财务自由,难道这算失败 ?
反之,在30之前实现财务自由就算成功 ?
这个问题也是取决于个人身边的种种因素如,朋友圈,亲戚,家庭,观看社交媒体的类型等等。
所以我逐渐意识到一个人能真正的跟着自己内心做自己的人,不被周遭的诱惑牵动和随波逐流才能在当今时代过得比他人开心。

0%
s